package service_base

import (
	"strings"
	"wrblog-api-go/app/dao/dao_base"
	"wrblog-api-go/app/model/model_base"
)

func GetArticleLibraryPageList(baseArticleLibrary model_base.SelectBaseArticleLibrary) ([]model_base.BaseArticleLibraryVo, int64, error) {
	return dao_base.GetArticleLibraryPageList(baseArticleLibrary)
}

func GetArticleLibraryInfo(libraryId int) (model_base.BaseArticleLibraryVo, error) {
	return dao_base.GetArticleLibraryInfo(libraryId)
}

func AddArticleLibrary(baseArticleLibrary model_base.BaseArticleLibraryPo) (int, error) {
	return dao_base.AddArticleLibrary(baseArticleLibrary)
}

func EditArticleLibrary(baseArticleLibrary model_base.BaseArticleLibraryPo) (int64, error) {
	return dao_base.EditArticleLibrary(baseArticleLibrary)
}

// RemoveArticleLibrary 逻辑删除
func RemoveArticleLibrary(libraryIds string, uk string) (int64, error) {
	return dao_base.RemoveArticleLibrary(strings.Split(libraryIds, ","), uk)
}
